home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 October / Ahoy_Magazine_85-10_1985_Double_L.d64 / shotgun loader (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  52 lines

  1. 1 print"[147]":poke53280,0:poke53281,6:poke646,1
  2. 2 rem       "shotgun loader"
  3. 4 rem      by r. harold droid
  4. 10 ifsg=1then30
  5. 20 sg=1:load"shotgun shell",8,1
  6. 30 printchr$(13)"this program creates an auto-menu"
  7. 33 print"  for a given disk"chr$(13)
  8. 34 print"sys51200 enables your new program:"
  9. 35 print" shift/restore breaks to menu"
  10. 36 print" space/restore reruns without reloading"
  11. 37 print" run-stop/restore disables"
  12. 38 print" commodore/restore does non-disabling"
  13. 39 print"   warm start"chr$(13)
  14. 40 print"insert a disk containing"
  15. 50 print"  basic program files"
  16. 60 print"  then press a key"chr$(13)
  17. 70 poke198,0:wait198,1
  18. 80 rem ******* read directory ********
  19. 85 pn=1:pt=51769
  20. 90 open1,8,0,"$0"
  21. 100 flag=1:rem flag set for reading disk name
  22. 110 f$="":get#1,b$,b$,b$,b$
  23. 120 get#1,b$:if st<>0 then320
  24. 130 if b$<>chr$(34) then120
  25. 140 get#1,b$:if b$<>chr$(34)then f$=f$+b$:goto140
  26. 150 get#1,b$:if b$=chr$(32) then150
  27. 160 get#1,b$:ifb$<>""then160
  28. 170 if st<>0 then320
  29. 180 ifflag=0then230
  30. 190 flag=0:dn$(dn)=f$:print"disk name: "dn$(dn)chr$(13)
  31. 200 print"indicate whether a file should"
  32. 210 print"  be included in the auto-menu"
  33. 215 print"  by pressing y or n"
  34. 218 print"  capacity is 26 files!"chr$(13)
  35. 220 goto110
  36. 230 printf$;
  37. 240 poke198,0:wait198,1:geta$:ifa$="y"then270
  38. 250 ifa$="n"thenpoke211,0:print"                ";:poke211,0:goto110
  39. 260 goto240
  40. 270 print
  41. 275 iflen(f$)<>16thenf$=f$+chr$(160):goto275
  42. 280 fora=1to16:pokept,asc(mid$(f$,a,1)):pt=pt+1:next
  43. 290 pn=pn+1:ifpn>27then400
  44. 310 goto110
  45. 320 close1:poke51768,pn:pt=pt+1
  46. 322 print:input"auto menu filename  shotgun[157][157][157][157][157][157][157][157][157]";pg$
  47. 330 open8,8,8,pg$+",p,w"
  48. 340 print#8,chr$(0);:print#8,chr$(192);
  49. 350 fora=51200topt:print#8,chr$(peek(a));:next
  50. 360 close8:end
  51. 400 print"menu capacity exceeded!  try again...":close1:goto85
  52.